package com.kjc.demo.basic.interceptor;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import lombok.extern.slf4j.Slf4j;

/**
 * @author ：keep
 * @version ：1.0
 * @date ：Created in 12:32 2019/1/5
 * @description：全局异常处理
 * @modified by：
 */
@RestControllerAdvice
@Slf4j
public class GlobalControllerAdvice {
    private final static String SYSTEM_ERROR = "5000";
    /**
     * 全局异常捕捉处理
     * @param ex 异常信息
     */
    @ResponseBody
    @ExceptionHandler(value = Exception.class)
    public String exceptionHandler(Exception ex) {
        
        return "fail";
    }
}
